//
//  BaseMusicCell.m
//  SleepingElf
//
//  Created by karong on 2023/10/10.
//

#import "BaseMusicCell.h"
#import "NSString+Number.h"

@interface BaseMusicCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *durationLabel;
@property (weak, nonatomic) IBOutlet UIImageView *lockImageView;
@property (weak, nonatomic) IBOutlet UILabel *viewLabel;

@end

@implementation BaseMusicCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.lockImageView.hidden = YES;
}

- (void)setDataWithObject:(MusicModel *)object {
    [super setDataWithObject:object];
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:object.cover] placeholderImage:SEPlaceholderImage];
    self.titleLabel.text = object.title;
    self.durationLabel.text = object.duration;
    self.viewLabel.text = SESF(WSLocalized(@"%@人播放"), [NSString gr10Thousands1DecimalWithValue:object.views]);
}

@end
